package cn.jobstart.spider.pageProcessor;

import cn.jobstart.spider.AbstractTalentSearch;
import us.codecraft.webmagic.processor.PageProcessor;

/**
 * @author sunke
 * @version 1.0
 * @Description
 * @date 2023-09-18 16:04
 */
public abstract class AbstractPageProcessor<S extends AbstractTalentSearch> implements PageProcessor {

    //爬取最大的数量
    public final int MAX_PAGE_COUNT=10000;


    public int getPageCount() {
        return MAX_PAGE_COUNT;
    }

    private S search;
    private String talentSubscriptionTaskId;

    public S getSearch() {
        return search;
    }

    public AbstractPageProcessor<S> setSearch(S search) {
        this.search = search;
        return this;
    }

    public String getTalentSubscriptionTaskId() {
        return talentSubscriptionTaskId;
    }

    public AbstractPageProcessor setTalentSubscriptionTaskId(String talentSubscriptionTaskId) {
        this.talentSubscriptionTaskId = talentSubscriptionTaskId;
        return this;
    }

    /**
     * 渠道
     * @return
     */
    public abstract int getChannelFlag();
}
